/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ParTreeVisualizer;

import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author mwh
 */
public class ButtonPanel extends JPanel {

    JButton nextButton;

    JButton prevButton;


    public ButtonPanel(ActionListener nextAction, ActionListener prevAction, ActionListener printAction) {



        nextButton = new JButton("Next");
        prevButton = new JButton("Previous");
        JButton printButton = new JButton("Print");

        nextButton.addActionListener(nextAction);
        prevButton.addActionListener(prevAction);
        printButton.addActionListener(printAction);

        add(prevButton);
        add(nextButton);
        add(printButton);
    }


    public void setNext(boolean b) {
        nextButton.setEnabled(b);
    }


    public void setPrevious(boolean b) {
        prevButton.setEnabled(b);
    }
}
